# -*- coding: utf-8 -*-
# @Author: Tim Liu
# @Date: 2024-05-11
# @Last Modified by: Tim Liu
# @Last Modified time: 2024-05-11

# @Description: question request schema

from pydantic import BaseModel

class QuestionRequest(BaseModel):
    """
        question: user question
        
        kbase_id: knowledgebase id which will be used to answer user's question
        kbase_name: knowledgebase name which will be used to answer user's question
        
        url: url contains context which will be used to answer user's question
        
        instructions: instructions as initial prompt for the question
        
        web_search : true(1) use web search to get more context, false(0) do not use web search
    """   
    question: str = None
        
    # rag chat against url
    url: str = None
    
    # knowledgebase id
    kbase_id: int = 0
    
    # knowledgebase name
    kbase_name: str = None
        
    # knowledgebase name
    instructions: str = None        
        
    # search web for context
    web_search: int = 0
    
    # rag engine, support vector and graph
    engine: str = "graph"
    
    conversation_id: str = None
    
    # tools: list = []
    tools: list = []
 
    #config: str = None
    # config_fields: dict = None
